<?php

class accessControlFilter extends CFilter
{
	public $roles;

	public function preFilter($filterChain)
	{
		if(!in_array(Yii::app()->user->getState('role'),$this->roles))
			Yii::app()->request->redirect(Yii::app()->user->getReturnUrl());
		else
			return true;
	}

	public function postFilter($filterChain)
	{

	}
}
